/**
 * Created by IntelliJ IDEA.
 * User: Tomek
 * Date: 09.02.13
 * Time: 14:28
 * To change this template use File | Settings | File Templates.
 */
package AS3.calculator {
public class FossilsConsumption {
    public function FossilsConsumption() {
    }

    private var _coal:Number;
    private var _oil:Number;
    private var _gas:Number;

    public function getCoalShare():Number {
        return _coal/(_coal + _oil + _gas);
    }

    public function getOilShare():Number {
       return _oil/(_coal + _oil + _gas);
    }

     public function getGasShare():Number {
       return _gas/(_coal + _oil + _gas);
    }

    public function get coal():Number {
        return _coal;
    }

    public function set coal(value:Number):void {
        _coal = value;
    }

    public function get oil():Number {
        return _oil;
    }

    public function set oil(value:Number):void {
        _oil = value;
    }

    public function get gas():Number {
        return _gas;
    }

    public function set gas(value:Number):void {
        _gas = value;
    }
}
}
